﻿#ifndef OPERATEWIDGET_H
#define OPERATEWIDGET_H

#include <QListWidget>
#include <QStackedWidget>
#include <QWidget>
#include "friend.h"
#include "protocol.h"
#include "filewidget.h"
namespace  Ui {
class OperateWidget;
}
class OperateWidget : public QWidget
{
    Q_OBJECT
public:
    explicit OperateWidget(QWidget *parent = nullptr);
    ~OperateWidget();

    static OperateWidget &getInstance();

    Friend *getFriend();
    FileWidget* getFileWidget();

    void setUsrName(QString usrName);

    void handleAddFriendRequst(PDU* pdu);

    void handleAddFriendAgeree(PDU* pdu);

    void handleAddFriendRefuse(PDU* pdu);

private:
    Ui::OperateWidget *ui;
    Friend *m_pFriend;
    FileWidget *m_filewidget = NULL;
    QString m_usrName = "test";

signals:
};

#endif // OPERATEWIDGET_H
